/*
 * Copyright 2010 Christoph Widulle (christoph.widulle@googlemail.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */



package com.android1.amarena2d.commons;

public class Size {

    public float width, height;

    public Size(float width, float height) {
        this.width = width;
        this.height = height;
    }


    public void set(float width, float height) {
        this.width = width;
        this.height = height;
    }

    public void set(Size size) {
        this.width = size.width;
        this.height = size.height;
    }

    public void setWidth(float width) {
        this.width = width;
    }
    
    public void setHeight(float height) {
        this.height = height;
    }

    public float getWidth() {
        return width;
    }

    public float getHeight() {
        return height;
    }

    public Size() {
    }

    public static Size zero() {
        return new Size(0, 0);
    }

    public boolean isZero() {
        return width == 0 && height == 0;
    }

    public void clear() {
        width = 0;
        height = 0;
    }

    public boolean equals(float width, float height){
        return this.width == width && this.height == height;
    }


}
